package com.cunshe.entity.vo;

import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotEmpty;
import javax.validation.constraints.NotNull;
import javax.validation.constraints.Size;
import java.io.Serializable;
import java.util.List;

/**
 * 产品
 * @author xiao
 */
@Data
@Builder
@AllArgsConstructor
@NoArgsConstructor
public class ProductUpdateVO implements Serializable {

    /**
     * 主键
     */
    @ApiModelProperty(value = "id")
    @NotNull(message = "[id]不能为空")
    private Long id;

    /**
     * 一级分类
     */
    @ApiModelProperty(value = "一级分类")
    @NotBlank(message = "[category1]不能为空")
    @Size(max = 32, message = "${validatedValue}长度不能大于{max}")
    private String category1;

    /**
     * 二级分类
     */
    @ApiModelProperty(value = "二级分类")
    @NotBlank(message = "[category2]不能为空")
    @Size(max = 32, message = "${validatedValue}长度不能大于{max}")
    private String category2;

    /**
     * 标题
     */
    @ApiModelProperty(value = "标题")
    @NotBlank(message = "[title]不能为空")
    @Size(max = 255, message = "${validatedValue}长度不能大于{max}")
    private String title;

    /**
     * 描述
     */
    @ApiModelProperty(value = "描述")
    @NotBlank(message = "[description]不能为空")
    @Size(max = 1000, message = "${validatedValue}长度不能大于{max}")
    private String description;

    /**
     * 详细介绍
     */
    @ApiModelProperty(value = "详细介绍")
    @NotBlank(message = "[content]不能为空")
    private String content;

    /**
     * SEO关键字
     */
    @ApiModelProperty(value = "SEO关键字")
    @Size(max = 255, message = "${validatedValue}长度不能大于{max}")
    private String seoKeyword;

    /**
     * SEO描述
     */
    @ApiModelProperty(value = "SEO描述")
    @Size(max = 255, message = "${validatedValue}长度不能大于{max}")
    private String seoDescription;

    /** 产品图片 */
    @ApiModelProperty(value = "产品图片")
    private List<String> images;

    private static final long serialVersionUID = 1L;
}